package com.zbkj.crmeb.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * banner跳转类型
 * @Description: 
 * @author duyb
 * @date 2022-10-26
 */
public enum BannerJumpTypeEnum implements IEnum<Integer> {
    /**
     * 类型
     */
    PRODUCT(1, "商品"),
    MODULE(2, "模块"),
    BRAND(3, "品牌"),
    ;

    private final Integer code;
    private final String msg;

    BannerJumpTypeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @JsonCreator
    public static BannerJumpTypeEnum valueOf(Integer code) {
        for (BannerJumpTypeEnum value : values()) {
            if (code.equals(value.getCode())) {
                return value;
            }
        }
        return null;
    }

    @Override
    @JsonValue
    public Integer getValue() {
        return code;
    }

}

